package org.hzero.order.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.Tag;
import springfox.documentation.spring.web.plugins.Docket;

/**
 * @ Description   :  Swagger Api 描述配置
 * @ Author        :  xiong.yilin@hand-china.com
 * @ CreateDate    :  2019/8/8 10:15
 */
@Configuration
public class SwaggerApiConfig {
    public static final String COMPANY = "Comapny";
    public static final String SOHEADER = "SoHeader";
    public static final String SOLINE = "SoLine";
    public static final String CUSTOMER = "Customer";
    public static final String ITEM = "Item";

    @Autowired
    //此处会定义一个类型为Docket的bean
    public SwaggerApiConfig(Docket docket) {
        docket.tags(
                new Tag(COMPANY, "公司信息"),
                new Tag(SOHEADER, "订单信息"),
                new Tag(SOLINE, "订单详情信息"),
                new Tag(CUSTOMER, "客户信息"),
                new Tag(ITEM, "物料信息")
        );
    }
}
